package com.yundasys.lab08jvm.threadpool;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @PACKAGE_NAME: com.yundasys.lab08jvm.threadpool
 * @NAME: LinkedBlockingQueueTest
 * @USER: jiangta
 * @DATE: 2021/2/12
 * @TIME: 6:56 下午
 * @PROJECT_NAME: springboot-labs
 */
public class LinkedBlockingQueueTest {

    public static void main(String[] args) {
        LinkedBlockingQueue<Object> queue = new LinkedBlockingQueue<>(1);
        queue.add("abc");
        boolean edf = queue.offer("edf");
        System.out.println(edf);
        queue.add("g");//IllegalStateException: Queue full
    }
}
